from django.db import models

# Create your models here.

class Document(models.Model):
	title = models.CharField(max_length=200)
	creation_date = models.DateTimeField('creation date')
	content = models.TextField()
	version = models.IntegerField()
	lang = models.CharField(max_length=10)
	target_lang = models.CharField(max_length=10)
	def __unicode__(self):
		return self.title

class DocumentVersion(models.Model):
	document = models.ForeignKey(Document)
	version = models.IntegerField()
	title = models.CharField(max_length=200)
	comment = models.CharField(max_length=200)
	creation_date = models.DateTimeField('creation date')
	content = models.TextField()
	def __unicode__(self):
		return self.title + " : version " + str(self.version)

